package com.share.barter.action;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;

import com.share.barter.data.services.BarterService;
import com.share.barter.common.BaseAction;

@SuppressWarnings("unchecked")
public class BarterAction extends BaseAction{
	@Autowired  BarterService BarterService;
	private List BarterList;
	/**
	 * 主页检索
	 * TODO
	 * @return
	 * @throws Exception
	 */
	public String view() throws Exception{
		String result="error";
		try{
			BarterList = BarterService.view();
			result ="seccuss";
			}catch(Exception e){
				e.printStackTrace();
				result = "error";
			}
		return result;
		}
	
	public String save(List list) throws Exception{
		String result="error";
		try{
			//保存
			
		
		
		}catch(Exception e){
			e.printStackTrace();
			result ="error";
		}
		return result;
	
	}
	
	// ******************set/get************************
	public List getBarterList() {
		return BarterList;
	}

	public void setBarterList(List barterList) {
		BarterList = barterList;
	}
	
}
